import BuffUtil from '@/BuffUtil';
import UnitSpellEvent from '@/event/UnitSpellEvent';
import UnitCommon from 'code/Core/Common/UnitCommon';
export default class Item_狂心氏族权杖 {
    static id = 'Akxz';
    static 名称: string = '狂心氏族权杖';
    static 描述: string = '你终于明白了一只熊生气起来的模样';
    static 图标: string = 'ReplaceableTextures\\CommandButtons\\BTNDOTAdeptTraining.blp';
    static buffId: string = 'buff_item_kuangxinquanzhang';
    static buffType: AppBuffType = {
        id: 'buff_item_kuangxinquanzhang',
        name: Item_狂心氏族权杖.名称,
        ubertip: Item_狂心氏族权杖.描述,
        art: Item_狂心氏族权杖.图标,
        attribute: {
            法术强度百分比: 1,
        },
        dur: 12,
        targetArt: 'Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl',
        targetAttach: 'overhead',
    };
    constructor() {
        BuffUtil.registerBuffType(Item_狂心氏族权杖.buffType);
        se.onUnitSpellEffect(Item_狂心氏族权杖.spellEffect, Item_狂心氏族权杖.id);
        EventManager.onBeforApplyAttack(Item_狂心氏族权杖.attackEffect);
    }
    static attackEffect(d: DamageEventData) {
        if (!BuffUtil.hasUnitBuff(d.source, Item_狂心氏族权杖.buffId)) return;
        let dmg = UnitCommon.取法强(d.source);
        d.initDamage += dmg;
        DamageSystemInstance.applyHeal(d.source, d.source, dmg);
    }
    static spellEffect(this: void, d: UnitSpellEvent) {
        BuffUtil.addBuff(d.trigUnit, Item_狂心氏族权杖.buffId, d.trigUnit);
    }
}
